from fastapi.testclient import TestClient

from main import ReqQuestion, RespAnswer

def test_query(client: TestClient):
    response = client.post(f"/query", json=ReqQuestion(question="中国国家主席是谁").model_dump())
    assert response.status_code == 200
    assert "习近平" in response.text

def test_healthy(client: TestClient):
    response = client.get(f"/health")
    assert response.status_code == 200    
    assert "ok" in response.text
